#ifndef _VPN_H_
#define _VPN_H_

#include "main.h"

#define OPENVPN_CLIETN_CONFIG_FILE "/etc/openvpn/client%d.conf" 
#define OPENVPN_SERVER_CONFIG_FILE "/etc/openvpn/server%d.conf"


const std::string SSLVPN_CLIENT_CONFIG_FILE = "/etc/openvpn/client.conf" ;
const std::string SSLVPN_SERVER_CONFIG_FILE = "/etc/openvpn/server.conf" ;

const std::string SSLVPN_SERVER_PASSWD_FILE	= "/etc/openvpn/psw-file" ;
const std::string SSLVPN_CLIENT_PASSWD_FILE	= "/etc/openvpn/auth.txt" ;

extern bool create_vpn_server_conf(int port, std::string proto, int vid) ;
extern bool create_vpn_client_conf(std::string vpn_server, int vid, int local_port, int server_port, std::string proto) ;

extern void createOpenvpnServerAuth() ;
extern void createOpenvpnClientAuth() ;

extern bool getPortFromVlanVector() ;

extern bool createVpnFile(int serverOrNot) ;

extern void openvpnClientRestart() ;
extern void openvpnServerRestart() ;


#endif
